import req1 from '@/lib/req1'
//获取日报列表
export function staListAPI(){
    return req1.get('/menu/menuList')
}
//新增日报
export function addStaInsertAPI({path  ,name  ,level ,title ,isMenu ,titleIcon,auth,component,lastMenu }){
    auth = auth.join()
    // console.log({path  ,name  ,level ,title ,isMenu ,titlelcon,auth,component,lastMenu});
return req1.post('/menu/menuAdd',{path  ,name  ,level ,title ,isMenu ,titleIcon,auth,component,lastMenu })
}
//修改
export function staUpdateAPI({id,path  ,name  ,level ,title ,isMenu ,titlelcon,auth,component,lastMenu }){
    auth = auth.join()
  return req1.put('/menu/menuUpdate',{id,path  ,name ,level ,title ,isMenu ,titlelcon,auth,component,lastMenu})
}
//删除
export function staDeleteAPI(id){
    id = id.join()
    return req1.delete('/menu/menuDelete',{id})
}
//一级菜单列表
export function firstMenu(){
    return req1.get('/menu/menuFirst')
}
//角色
export function roleListAPI(){
    return req1.get('/role/roleList')
}
